﻿using Domain.Entitys.Inv;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.EntityConfigurations.Inv
{
    public class inv_prodInfoConfigurations : IEntityTypeConfiguration<Inv_prodInfo>
    {
        public void Configure(EntityTypeBuilder<Inv_prodInfo> builder)
        {
            builder.ToTable("Inv_prodInfo");
            builder.HasKey(e => e.ProdInfo_id);

            builder.HasOne(e => e.Main)
                   .WithMany(e => e.Details)
                   .HasForeignKey(e => e.Samp_id);
        }
    }
}
